home *** CD-ROM | disk | FTP | other *** search
- #include<exec/libraries.h>
- #include<intuition/intuition.h>
- #include<utility/tagitem.h>
- #include<graphics/text.h>
-
- #include<string.h>
-
- #include<clib/exec_protos.h>
- #include<clib/graphics_protos.h>
- #include<clib/intuition_protos.h>
-
- struct Library* GfxBase;
- struct Library* IntuitionBase;
-
- void main()
- {
- GfxBase = OpenLibrary("graphics.library",36);
- if(GfxBase != NULL)
- {
- IntuitionBase = OpenLibrary("intuition.library",36);
- if(IntuitionBase != NULL)
- {
- struct Window* win;
- win = OpenWindowTags(NULL,
- WA_Left, 20,
- WA_Top, 20,
- WA_Width, 200,
- WA_Height, 100,
- WA_Flags, WFLG_CLOSEGADGET,
- WA_IDCMP, IDCMP_CLOSEWINDOW,
- TAG_DONE, 0);
- if(win != NULL)
- {
- char* text;
- text = "Hello World!";
- SetAPen(win->RPort, 1);
- Move(win->RPort, 10, 60);
- Text(win->RPort, text, strlen(text));
- WaitPort(win->UserPort);
- CloseWindow(win);
- }
- CloseLibrary(IntuitionBase);
- }
- CloseLibrary(GfxBase);
- }
- }
-